import request from '@/router/axios';
// 获取工程部，采购部，品管部评分列表
export const getStandardList = (dept, supplierNo, params) => {
  return request({
    url: '/api/blade-supplier-management/supplieraccessscore/standardList',
    method: 'get',
    params: {
      ...params,
      dept,
      supplierNo
    }
  })
}
// 保存工程部，采购部，品管部评分列表
export const saveStandardList = (data) => {
  return request({
    url: '/api/blade-supplier-management/supplieraccessscore/saveIndexScore',
    method: 'post',
    data: data
  })
}

// 获取评分总结列表
export const getSummeryList = (supplierNo, params) => {
  return request({
    url: '/api/blade-supplier-management/supplieraccessscore/supplierSummary',
    method: 'get',
    params: {
      ...params,
      supplierNo
    }
  })
}

// 获取供应商评分结果
export const getCalSummaryScore = (supplierNo, params) => {
  return request({
    url: '/api/blade-supplier-management/supplieraccessscore/calSummaryScore',
    method: 'get',
    params: {
      ...params,
      supplierNo
    }
  })
}
// 保存供应商评审信息
export const saveSupplierScore = (data) => {
  return request({
    url: '/api/blade-supplier-management/supplieraccessscore/saveSupplierScore',
    method: 'post',
    data: data
  })
}

// 提交审批
export const submitApproval = (id,type) => {
  return request({
    url: '/api/blade-supplier-management/supplieraccessscore/start-process',
    method: 'get',
    params: {
      id,
      type
    }
  })
}